package com.paranoidmonkey.ode.Joint;

import com.paranoidmonkey.ode.AndrODE;
import com.paranoidmonkey.ode.World;

public class PR extends Joint{
	public PR(World world,JointGroup group){
		handle=AndrODE.dJointCreatePR (world.getHandle(), group.groupID);
	}
	public void setAnchor(float x, float y, float z){
		AndrODE.dJointSetPRAnchor (handle, x, y, z);
	}
	public void setAxis1(float x, float y, float z){
		AndrODE.dJointSetPRAxis1 (handle, x, y, z);
	}
	public void setAxis2(float x, float y, float z){
		AndrODE.dJointSetPRAxis2 (handle, x, y, z);
	}
	public void setParam(int parameter, float value){
		AndrODE.dJointSetPRParam (handle, parameter, value);
	}
	public void addTorque(float torque){
		AndrODE.dJointAddPRTorque (handle, torque);
	}
	public void getAnchor(float[] result){
		AndrODE.dJointGetPRAnchor (handle, result);
	}
	public float getPosition(){
		return AndrODE.dJointGetPRPosition (handle);
	}
	public float getPositionRate(){
		return AndrODE.dJointGetPRPositionRate (handle);
	}
	public float getAngle(){
		return AndrODE.dJointGetPRAngle (handle);
	}
	public float getAngleRate(){
		return AndrODE.dJointGetPRAngleRate (handle);
	}
	public void getAxis1(float[] result){
		AndrODE.dJointGetPRAxis1 (handle, result);
	}
	public void getAxis2(float[] result){
		AndrODE.dJointGetPRAxis2 (handle, result);
	}
	public float getParam(int parameter){
		return AndrODE.dJointGetPRParam (handle, parameter);
	}

}
